using System;
using System.Collections.Generic;
using System.Text;
namespace BLL.BusinessLayer
{
	[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")]
	[Serializable]
	public class ClsRoles: BusinessObjectBase
	{

		public ClsRoles() {}

		#region InnerClass
		public enum ClsRolesFields
		{
			RoleID,
			RoleName,
			Description
		}
		#endregion

		#region Data Members

			int _roleID;
			string _roleName;
			string _description;

		#endregion

		#region Properties

		public int  RoleID
		{
			 get { return _roleID; }
			 set
			 {
				 if (_roleID != value)
				 {
					_roleID = value;
					 PropertyHasChanged("RoleID");
				 }
			 }
		}

		public string  RoleName
		{
			 get { return _roleName; }
			 set
			 {
				 if (_roleName != value)
				 {
					_roleName = value;
					 PropertyHasChanged("RoleName");
				 }
			 }
		}

		public string  Description
		{
			 get { return _description; }
			 set
			 {
				 if (_description != value)
				 {
					_description = value;
					 PropertyHasChanged("Description");
				 }
			 }
		}


		#endregion

		#region Validation

		internal override void AddValidationRules()
		{
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("RoleID", "RoleID"));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("RoleName", "RoleName",100));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Description", "Description",1000));
		}

		#endregion

	}
}
